package org.csmz.xg2333.JiaoTong;

public class TeZheng {
    String name;
    int lunNum;
    String color;
    String ff;
    int v;
    String vJia = "加速";
    String vJian = "减速";
    public void xingShi(){
        System.out.println(lunNum+"个轮子的"+color+name+"正在路上以"+v+"km/h的速度行驶,前进方式为"+ff);
    }
    public void xingWei(int v){
        if (v>this.v){
            System.out.println("正在"+vJia+" 当前行驶速度："+v);
        }else if (v<this.v){
            System.out.println("正在"+vJian+" 当前行驶速度："+v);
        }else {
            System.out.println("当前车速无变化，车速为"+v);
        }
        this.v = v;
    }
}
